#pragma once

#ifndef Network_Manager_h__
#define Network_Manager_h__

#include <Assert.h>
#include <QVariantMap>
#include "Connection.h"

namespace TC
{
    namespace Network
    {
        class Manager
        {
        private:
            Manager();
        public:
            ~Manager();
        public:
            /*!
            * \note Do Remember to delete the Connection returned.
            * */
            Connection *get(const QString &command, const QVariantMap &args = QVariantMap{});
        public:
            Connection *createSocket(QObject *parent = nullptr);

            static Manager* instance();
        private:
            static Manager* _instance;
        };
    }
}
#endif // Network_Manager_h__
